#coding:utf8
str = "           shi     song &yan  "
print str
print str.strip()
print str.lstrip()
print str.rstrip()


str = "123&567"
print str[:3]+str[4:]


str = "[pabc[p123"
print str.replace("[p", "")


